"""
直接调用：
python3 /root/workspace/000054/SDxeon/backend/main-pic_model.py --local_file_path 'SDxeon/backend/pic_model/uml-test.jpg'
"""

# /SDxeon/backend/pic_model 已被打包成一个Python包, 注意导入的相对位置
# 放到 /SDxeon 下换成 from backend.pic_model import upload_file_to_oss, get_response
from pic_model import upload_file_to_oss, get_response

def get_sketch_pic_info(local_file_path='SDxeon/backend/pic_model/uml-test.jpg'):
    """
    args:
        local_file_path: 从前端上传的图片, 位于后端的文件路径
    returns:
        response: Qwen2.5-VL-7B-Instruct模型生成的读取结果
    """
    url = upload_file_to_oss(local_file_path)
    response = get_response(url)
    print(response)
    return response

if __name__ == "__main__":
    # local_file_path = 'SDxeon/backend/pic_model/uml-test.jpg'
    # get_sketch_pic_info(local_file_path)
    get_sketch_pic_info()